package ModelLayer;

/**
 * Loan class contains information about
 * the loaner.
 * 
 * @author (team 1)
 */
public class Loan
{
    //Field for a loaner
    private long id;
    private String borrowDate;
    private String period;
    private String state;

    //Test af loan
    private Copy co;
    private Person per;

    public Loan(long id, String bd, String per, String state, Copy c, Person p)
    {
        this.id = id;
        this.borrowDate = bd;
        this.period = per;
        this.state = state;

        //Til test
        this.co = c;
        this.per = p;
    }

    //Set and get id
    /**
       sets id
       @param id as loan id
       */
    public void setId(long id)
    {
        this.id = id;
    }
    /**
       returns loan id
       @return a long
       */
    public long getId()
    {
        return this.id;
    }

    //Set and get borrowdate
    /**
       sets borrow date
       @param borrow as borrowDate
       */
    public void setBorrowDate(String borrow)
    {
        this.borrowDate = borrow;
    }
    /**
     returns borrowDate
     @return String borrowDate
       */
    public String getBorrowDate()
    {
        return borrowDate;
    }

    //set and get period
    /**
       sets period
       @param per as period
       */
    public void setPeriod(String per)
    {
        this.period = per;
    }
    /**
     * returns period
     * @return String period
       */
    public String getPeriod()
    {
        return this.period;
    }

    //Set and get state
    /**
       sets state
       @param state as state
       */
    public void setState(String state)
    {
        this.state = state;
    }
    /**
     * returns state
     * @return String state
       */
    public String getState()
    {
        return this.state;
    }

    //Til test
    //Set and get copy
    /**
     * sets c
     * @param c as co 
       */
    public void setCopy(Copy c)
    {
        this.co = c;
    }
    /**
     * return co
     * @return Copy co
       */
    public Copy getCopy()
    {
        return co;
    }

    //Set and get person
    /**
     * sets per
     * @param per as per;
       */
    public void setPerson(Person per)
    {
        this.per = per;
    }
    /**
     * return per
     * @return Person per
       */
    public Person getPerson()
    {
        return this.per;
    }
}
